package cn.yshujia.transform;

import cn.yshujia.domain.entity.Comment;
import cn.yshujia.domain.vo.CommentVO;

/**
 * @author YShuJia
 * @create 2024/12/16
 * @description CommentTransform
 */

public class CommentTransform {
	public static CommentVO entity2VO (Comment comment) {
		if (comment == null) {
			return null;
		}
		CommentVO commentVO = new CommentVO();
		commentVO.setId(comment.getId());
		commentVO.setSourceId(comment.getSourceId());
		commentVO.setFloorId(comment.getFloorId());
		commentVO.setLikeCount(comment.getLikeCount());
		commentVO.setContent(comment.getContent());
		commentVO.setImgUrl(comment.getImgUrl());
		commentVO.setCreateTime(comment.getCreateTime());
		return commentVO;
	}
}
